package com.bestv.search.common.service;

import com.bestv.search.common.dataSource.DataSourceKey;
import com.bestv.search.common.model.SysRole;
import com.bestv.search.common.model.SysUser;
import com.bestv.search.common.model.UserExistsException;

import java.util.List;

public interface SysUserManager {

    List<SysUser> getUsers(DataSourceKey key);

    SysUser saveUser(DataSourceKey key, SysUser user) throws UserExistsException;

    SysUser getUserById(DataSourceKey key, Long id);

    List<SysUser> getUserByName(DataSourceKey key, String name);

    List<SysUser> getUserByRole(DataSourceKey key, SysRole role);

    SysUser getUserByLoginName(DataSourceKey key, String loginName);

}
